﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RTNLip.Scripts
{
    class DataService
    {

        RTNDatabase masterDatabase = null;

        public DataService()
        {
            masterDatabase = new RTNDatabase();
        }

        public A AFirst
        {
            get { return masterDatabase.getFirstRecord<A>(); }
            set { masterDatabase.setSingleRecord<A>(value); }
        }

        public A ALast
        {
            get { return masterDatabase.getLastRecord<A>(); }
        }
        public A[] AArrays
        {
            get { return masterDatabase.getRecord<A>(); }
            set { masterDatabase.setRecord<A>(value); }
        }

        public B BFirst
        {
            get { return masterDatabase.getFirstRecord<B>(); }
            set { masterDatabase.setSingleRecord<B>(value); }
        }

        public B BLast
        {
            get { return masterDatabase.getLastRecord<B>(); }
        }
        public B[] BArrays
        {
            get { return masterDatabase.getRecord<B>(); }
            set { masterDatabase.setRecord<B>(value); }
        }

        public C CFirst
        {
            get { return masterDatabase.getFirstRecord<C>(); }
            set { masterDatabase.setSingleRecord<C>(value); }
        }

        public C CLast
        {
            get { return masterDatabase.getLastRecord<C>(); }
        }
        public C[] CArrays
        {
            get { return masterDatabase.getRecord<C>(); }
            set { masterDatabase.setRecord<C>(value); }
        }
    }
}
